home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / hlp_auth / stmous / generapp.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-01-10  |  9.7 KB  |  282 lines

  1. VERSION 2.00
  2. Begin Form STMouse_Form 
  3.    Caption         =   "STMOUSE Help"
  4.    ClientHeight    =   5325
  5.    ClientLeft      =   1125
  6.    ClientTop       =   1035
  7.    ClientWidth     =   5085
  8.    ClipControls    =   0   'False
  9.    Height          =   6015
  10.    Left            =   1065
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   5325
  13.    ScaleWidth      =   5085
  14.    Top             =   405
  15.    Width           =   5205
  16.    Begin STMOUSE StMouse1 
  17.       Prop6           =   "Click for About Box"
  18.       Left            =   2400
  19.       Top             =   3480
  20.    End
  21.    Begin CommandButton BTN_STMouseStop 
  22.       Caption         =   "Stop STM"
  23.       Height          =   375
  24.       Left            =   1920
  25.       TabIndex        =   15
  26.       Top             =   720
  27.       Width           =   1215
  28.    End
  29.    Begin CommandButton BTN_STMouseStart 
  30.       Caption         =   "Start STM"
  31.       Height          =   375
  32.       Left            =   240
  33.       TabIndex        =   14
  34.       Top             =   720
  35.       Width           =   1215
  36.    End
  37.    Begin ComboBox Combo1 
  38.       Height          =   300
  39.       Left            =   240
  40.       TabIndex        =   13
  41.       Text            =   "Combo1"
  42.       Top             =   2880
  43.       Width           =   2175
  44.    End
  45.    Begin OptionButton Option3 
  46.       Caption         =   "Maybe option"
  47.       Height          =   255
  48.       Left            =   1200
  49.       TabIndex        =   12
  50.       Top             =   4320
  51.       Width           =   1575
  52.    End
  53.    Begin PictureBox Picture1 
  54.       AutoSize        =   -1  'True
  55.       ClipControls    =   0   'False
  56.       Height          =   360
  57.       Left            =   360
  58.       Picture         =   GENERAPP.FRX:0000
  59.       ScaleHeight     =   330
  60.       ScaleWidth      =   360
  61.       TabIndex        =   11
  62.       Top             =   3600
  63.       Width           =   390
  64.    End
  65.    Begin CheckBox Check2 
  66.       Caption         =   "That"
  67.       Height          =   255
  68.       Left            =   1200
  69.       TabIndex        =   10
  70.       Top             =   3840
  71.       Width           =   1200
  72.    End
  73.    Begin CheckBox Check1 
  74.       Caption         =   "This"
  75.       Height          =   255
  76.       Left            =   1200
  77.       TabIndex        =   9
  78.       Top             =   3360
  79.       Width           =   1200
  80.    End
  81.    Begin Frame Frame1 
  82.       Caption         =   "Do it now"
  83.       Height          =   1215
  84.       Left            =   3000
  85.       TabIndex        =   6
  86.       Top             =   3120
  87.       Width           =   1695
  88.       Begin OptionButton Option2 
  89.          Caption         =   "No"
  90.          Height          =   255
  91.          Left            =   240
  92.          TabIndex        =   8
  93.          Top             =   720
  94.          Width           =   1000
  95.       End
  96.       Begin OptionButton Option1 
  97.          Caption         =   "Yes"
  98.          Height          =   255
  99.          Left            =   240
  100.          TabIndex        =   7
  101.          Top             =   360
  102.          Width           =   1000
  103.       End
  104.    End
  105.    Begin TextBox TXT_Result 
  106.       Height          =   375
  107.       Left            =   120
  108.       TabIndex        =   5
  109.       Text            =   "Status output"
  110.       Top             =   4800
  111.       Width           =   4815
  112.    End
  113.    Begin TextBox TXT_KeyString 
  114.       Height          =   375
  115.       Left            =   120
  116.       TabIndex        =   2
  117.       Text            =   "This is a popup message to display in the window. The message can be of long length, or it can be short."
  118.       Top             =   1560
  119.       Width           =   4815
  120.    End
  121.    Begin CommandButton BTN_Exit 
  122.       Caption         =   "Exit"
  123.       Height          =   375
  124.       Left            =   3600
  125.       TabIndex        =   1
  126.       Top             =   720
  127.       Width           =   1215
  128.    End
  129.    Begin TextBox TXT_SearchString 
  130.       Height          =   375
  131.       Left            =   120
  132.       TabIndex        =   0
  133.       Text            =   "Dawg"
  134.       Top             =   2280
  135.       Width           =   4815
  136.    End
  137.    Begin Label Label2 
  138.       Alignment       =   2  'Center
  139.       Caption         =   "Click ""Start STM"" and move mouse over a control to display the status line help text for."
  140.       Height          =   375
  141.       Left            =   240
  142.       TabIndex        =   16
  143.       Top             =   120
  144.       Width           =   4575
  145.    End
  146.    Begin Label Label3 
  147.       Alignment       =   2  'Center
  148.       Caption         =   "Search String"
  149.       Height          =   255
  150.       Left            =   120
  151.       TabIndex        =   4
  152.       Top             =   2040
  153.       Width           =   4815
  154.    End
  155.    Begin Label Label1 
  156.       Alignment       =   2  'Center
  157.       Caption         =   "Key String"
  158.       Height          =   255
  159.       Left            =   120
  160.       TabIndex        =   3
  161.       Top             =   1320
  162.       Width           =   4815
  163.    End
  164.    Begin Menu nmu_File 
  165.       Caption         =   "&File"
  166.       Begin Menu mnu_Exit 
  167.          Caption         =   "&Exit"
  168.       End
  169.    End
  170.    Begin Menu mnu_Edit 
  171.       Caption         =   "&Edit"
  172.       Begin Menu mnu_Cut 
  173.          Caption         =   "Cu&t"
  174.       End
  175.       Begin Menu mnu_Copy 
  176.          Caption         =   "&Copy"
  177.       End
  178.       Begin Menu mnu_Paste 
  179.          Caption         =   "&Paste"
  180.       End
  181.       Begin Menu mnu_submenu 
  182.          Caption         =   "SubMenu"
  183.          Begin Menu mnu_submenu1 
  184.             Caption         =   "SubMenu 1"
  185.          End
  186.          Begin Menu mnu_submenu2 
  187.             Caption         =   "SubMenu 2"
  188.          End
  189.       End
  190.    End
  191.    Begin Menu mnu_help 
  192.       Caption         =   "&Help"
  193.       Begin Menu mnu_HelpBalloons 
  194.          Caption         =   "Help &Balloons"
  195.       End
  196.    End
  197. Option Explicit
  198. ' Declare statements for utility functions included in STMOUSE.VBX
  199. Declare Function Hwnd2ControlTabIndex Lib "STMOUSE.VBX" (ByVal hwndControl%) As Integer
  200. Declare Function Hwnd2CtlName Lib "STMOUSE.VBX" (ByVal hwndControl%) As String
  201. Declare Function Hwnd2HelpContextID Lib "STMOUSE.VBX" (ByVal hwndControl%) As Long
  202. Declare Function Hwnd2TagText Lib "STMOUSE.VBX" (ByVal hwndControl%) As String
  203. Sub BTN_Exit_Click ()
  204.     mnu_Exit_Click
  205. End Sub
  206. Sub BTN_STMouseStart_Click ()
  207.     ' stmouse can also be started
  208.     ' via button or menu action
  209.     STMouse1.action = 60 'start
  210. End Sub
  211. Sub BTN_STMouseStop_Click ()
  212.     STMouse1.action = 61 ' stmouse stop
  213. End Sub
  214. Sub Form_Load ()
  215.     'stmouse can be started in the form load event
  216.     STMouse1.action = 60 'start
  217. End Sub
  218. Sub Form_Resize ()
  219.     If Me.WindowState = 0 Then
  220.         Me.Height = 6015
  221.         Me.Width = 5175
  222.         Me.Top = 0
  223.         Me.Left = 0
  224.     End If
  225. End Sub
  226. Sub mnu_Exit_Click ()
  227.     End
  228. End Sub
  229. Sub StMouse1_StMouseClick (hwndAtMouse As Integer)
  230. ' PURPOSE:  hwndAtMouse is the control the mouse is over
  231. ' COMMENTS: pass back the help text
  232. '           shows how to programmatcially end a session
  233. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  234. Dim Msg As String
  235.     If Me.hWnd = hwndAtMouse Then
  236.         TXT_Result.Text = "Mouse over main form"
  237.         Exit Sub
  238.     End If
  239.     ''use utility routines to retieve help text from properties
  240.     TXT_Result.Text = Hwnd2CtlName(hwndAtMouse) + " ... hwndAtMouse = " + Hex$(hwndAtMouse)
  241.     Exit Sub
  242.     '' Use the following alternate technique to place text
  243.     Select Case hwndAtMouse
  244.         Case Me.hWnd
  245.             ' if you want to blank the status line
  246.             ' when the the mouse moves off a control
  247.             ' add this line here
  248.             TXT_Result.Text = ""
  249.         Case BTN_StMouseStart.hWnd
  250.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control BTN_STMouseStart."
  251.         Case BTN_STMouseStop.hWnd
  252.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control BTN_STMouseStop."
  253.         Case BTN_Exit.hWnd
  254.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control BTN_Exit."
  255.         Case TXT_KeyString.hWnd
  256.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control TXT_KeyString."
  257.         Case TXT_SearchString.hWnd
  258.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control TXT_SearchString."
  259.         Case TXT_Result.hWnd
  260.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control TXT_Result."
  261.         Case Picture1.hWnd
  262.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control Picture1."
  263.         Case Check1.hWnd
  264.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control Check1."
  265.         Case Check2.hWnd
  266.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control Check2."
  267.         Case Frame1.hWnd
  268.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control Frame1."
  269.         Case Option1.hWnd
  270.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control Option1."
  271.         Case Option2.hWnd
  272.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control Option2."
  273.         Case Option3.hWnd
  274.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control Option3."
  275.         Case Combo1.hWnd
  276.             TXT_Result.Text = "The hwndAtMouse = " + Hex$(hwndAtMouse) + "The mouse is over the control Combo1."
  277.         Case Else
  278.         
  279.         End Select
  280.         
  281. End Sub
  282.